package demo5;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 石方旭
 * Date: 2022-07-23
 * Time: 22:40
 */
public class TestThread {

    public static void main(String[] args) {
        Thread t = new Thread(()-> {
            while(true){
                System.out.println("thread");
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        });
        t.start();


    }

}
